package net.zjitc.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

/**
 * @auther 郭梦婷
 * @create 2022-04-27 14:23:08
 * @describe 实体类
 */
@Data
@TableName("category")
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value="Category对象", description="")
public class Category implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "分类唯一ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "分类名称")
    @TableField("catename")
    private String catename;

    @ApiModelProperty(value = "分类父ID")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty(value = "分类层级 0: 顶级 1:二级 2:三级")
    @TableField("level")
    private Integer level;

    @ApiModelProperty(value = "是否删除 1为删除")
    @TableField("deleted")
    private Integer deleted;

    @ApiModelProperty(value = "子类")
    @TableField(exist = false)
    private List<Category> children;

}